<script setup>
const props = defineProps(['label','placeholder','describe'])
</script>

<template>

<div class="input-container">
  <div class="input-wrap">
    <div class="input__tg">
      <div class="input__label">
        {{label || '?'}}
      </div>
    </div>
    <div class="input__add">
      <div class="leftIcon"><img src="../assets/images/icon_minus@3x.png" alt=""></div>
      <div class="centerText">
        <input class="inputTxt" type="text" :placeholder="placeholder">
<!--        <div class="text">{{placeholder || '?'}}</div>-->
        <div class="desc" v-if="describe">{{describe || '?'}}</div>
      </div>
      <div class="rightIcon"><img src="../assets/images/icon_plus@3x.png" alt=""></div>
    </div>
  </div>
  <div>
    <!--其他可选数据-->
    <slot></slot>
  </div>
</div>

</template>

<style scoped lang="scss">
.input-container{
  border-radius:8px;
  background: #fff;
}
.input-wrap{
  width:100%;
  min-height:60px;
  overflow: hidden;
  display:flex;
  justify-content: space-between;
  align-items: center;
  border-radius:8px;
  background: #fff;

  .input__tg{
    //width:85px;
    .input__label{
        padding:0 6px;
        white-space: nowrap;
        height: 15px;
        color: rgba(29, 33, 50, 1);
        font-family: PingFangSC-Regular;
        font-weight: 400;
        font-size: 14px;
        line-height: 15px;
      &:after{
        content: " ";
        width:1px;
        height: 20px;
        border:1px solid #F2F2F2;
        margin-left:8px;
      }
    }
  }
  .input__add{
    display:flex;
    justify-content: space-between;
    align-items: center;
    margin-right:20px;
    .leftIcon{
      flex:none;
      width:32px;
      height:32px;
      img{
        width:32px;
        height:32px;
      }
    }
    .rightIcon{
      flex:none;
      width:32px;
      height:32px;
      img{
        width:32px;
        height:32px;
      }
    }
    .centerText{
      flex-direction: column;
      display: flex;
      justify-content: center;
      align-items: center;
      .inputTxt{
        width:120px;
        height:24px;
        text-align: center;
        line-height:24px;
        //border:1px solid red;
        color: rgba(36, 37, 38, 1);
        font-family: DINPro-Medium;
        font-weight: 450;
        font-size: 18px;
      }
      .text{
        height: 23px;
        text-align: center;
        color: rgba(36, 37, 38, 1);
        font-family: DINPro-Medium;
        font-weight: 450;
        font-size: 18px;
        line-height: 23px;
      }
      .desc{
        //width: 200px;
        white-space: nowrap;
        height: 17px;
        text-align: center;
        color: rgba(232, 72, 56, 1);
        font-family: PingFangSC-Regular;
        font-weight: 400;
        font-size: 12px;
        line-height: 17px;
      }
    }
  }
}
</style>